package com.tcm.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tcm.entity.Organization;
import com.tcm.entity.dto.OrgUpdateDto;
import com.tcm.entity.vo.OrgResult;
import com.tcm.exception.DatabaseOperationException;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 组织机构业务接口
 * @author Guqier
 * @version 1.0
 * @date 2023/7/4 19:44
 */
public interface OrganizationService extends IService<Organization> {
    List<OrgResult> getOrgNodesByParentId(Long parentId);

    @Transactional
    boolean addOrganization(OrgUpdateDto orgUpdateDto, Long currUserId);

    @Transactional
    boolean modifyOrganization(OrgUpdateDto orgUpdateDto, Long currUserId);

    @Transactional
    boolean removeOrganization(Long id, Long currUserId) throws DatabaseOperationException;

    List<Organization> getCollegeList();

    List<Organization> getMajorList();
}
